
These are the replication files for:

Pomeroy, Caleb "The Damocles Delusion: The Sense of Power Inflates Threat Perception in World Politics," International Organization.


Scripts and data included -----

1. "china_nuclear_experiment.R" reproduces the China proliferation experiment results. "china_nuclear_proliferation_data.rds" contains the data used in this script. 

2. "us_nuclear_experiment.R" reproduces the US proliferation experiment results. "us_nuclear_proliferation_data.rds" contains the data used in this script.

3. "us_time_pressure_experiment.R" reproduces the supplementary time pressure experiment results. "us_time_pressure_data.rds" contains the data used in this script.

4. "us_rise_decline_experiment.R" reproduces the supplementary rise/decline experiment results. "us_rise_decline_data.rds" contains the data used in this script.

5. "russia_elite_survey.R" reproduces the re-analysis of the survey of Russian elites. "russia_elite_data.sav" contains the data used in this script.

6. "frus_embedding_analysis.R" reproduces the text analysis of US Cold War foreign policy elites. The folder "word_embedding_resamples" contains the embedding models fitted to twenty resamples of the underlying corpus (named "resample_N.rds"). Each file is a "unique terms x 300 dimensional" matrix, populated with word coordinates. All twenty models are used in the text analyses to construct nonparametric confidence intervals. 


Replication process -----

1. Ensure there's a top-level folder "damocles_delusion_replication" (or whatever you'd like to call it), which contains a "scripts" folder and a "data" folder. The "scripts" folder contains the R scripts. The "data" folder contains the datasets. 

2. Set your working directory in R to the location of the top-level folder containing the replication files, e.g. setwd("~/Downloads/damocles_delusion_replication/")

3. Install the necessary packages listed at the top of the scripts if they aren't already installed.

4. The scripts are self-contained analyses, so you can run them in any order. 


Version details -----

-All analyses carried out using R version 4.3.1 and R studio version 2023.06.1.524 on a MacBook Pro (M1, 8GB RAM).

-Package versions: dplyr (1.1.2), ggplot2 (3.4.2), haven (2.5.3), lsa (0.73.3), mediation (4.5.0), plyr (1.8.8), psych (2.3.6), texreg (1.38.6).

